package edu.sctu.practice.class02.renzhaoxu.test08;



/**
 * Created by Administrator on 2015/10/15.
 */
public class Vehicles {

  private String brand;
  private String color;

   public Vehicles(String brand,String color){

       this.brand=brand;
       this.color=color;
   }

    public void run(){

        System.out.println("开动汽车");
    }

    public  void showInfo() {

        System.out.println("牌子" + brand + "颜色" + "color");
    }


    public static void main(String[] args) {

        Vehicles vehicles =new Vehicles("Audi","黑");

        Car audi_a4 = new Car("Audi","黑",5);

        Truck truck = new Truck("重汽","黑",10000);


        vehicles.run();
        vehicles.showInfo();

        audi_a4.run();
        audi_a4.showInfo();

        truck.run();
        truck.showInfo();
    }
}

